<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition template="templateadmin1.xhtml">
        <ui:define name="content">
            <center>
            <table border="0" id="detail-table"   >
            <h:form id="tour" >
                <tbody>
                    <tr>
                        <td><b>Tour Name</b></td>
                        <td><h:inputText value="#{listBean.pktour.packageTourName}" id="txtTourName" requiredMessage="please input name" required="true" styleClass="inp-form"></h:inputText></td>
                        <td><h:message for="txtTourName"  ></h:message></td>
                    </tr>
                    <tr>
                        <td><b>Package Type</b></td>
                        <td> <h:selectOneMenu value="#{listBean.pktour.packageTypeID}" styleClass="styledselect_form_hungtl">
                                <f:selectItems value="#{tourBean.lpackagetype}" var="package" itemLabel="#{package.packageTypeName}" itemValue="#{package.packageTypeID}"></f:selectItems>
                            </h:selectOneMenu></td>
                    </tr>
                    <tr>
                        <td><b>Location</b></td>
                        <td> <h:selectOneMenu value="#{listBean.pktour.locationID}" onchange="submit()" valueChangeListener="#{tourBean.placeChangeByID}" styleClass="styledselect_form_hungtl">
                                <f:selectItems value="#{tourBean.llocation}" var="loc" itemLabel="#{loc.locationName}" itemValue="#{loc.locationID}"></f:selectItems>
                            </h:selectOneMenu></td>
                    </tr>
                    <tr>
                        <td><b>Place</b></td>
                        <td> <h:selectOneMenu value="#{listBean.pktour.placeID}" onchange="submit()" valueChangeListener="#{tourBean.hotelChangeByID}" styleClass="styledselect_form_hungtl">
                                <f:selectItems value="#{tourBean.lplaces}" var="place" itemLabel="#{place.placeName}" itemValue="#{place.placeID}"></f:selectItems>
                            </h:selectOneMenu> </td>
                    </tr>
                    <tr>
                        <td><b>Hotel</b></td>
                        <td> <h:selectOneMenu value="#{listBean.pktour.hotelID}" styleClass="styledselect_form_hungtl">
                                <f:selectItems value="#{tourBean.lhotel}" var="hotel" itemLabel="#{hotel.hotelName}" itemValue="#{hotel.hotelID}"></f:selectItems>
                            </h:selectOneMenu></td>
                    </tr>
                    <tr>
                        <td><b>Price</b></td>
                        <td><h:inputText value="#{listBean.pktour.price}" onblur="testResults(this.form);" id="txtPrice"  styleClass="inp-form" required="true"></h:inputText></td>
                    </tr>
                    <tr>
                        <td><b>Travel</b></td>
                        <td><h:selectOneMenu value="#{listBean.pktour.travel}" styleClass="styledselect_form_hungtl">
                                <f:selectItem itemLabel="plane" itemValue="plane"></f:selectItem>
                                <f:selectItem itemLabel="car" itemValue="car"></f:selectItem>
                                <f:selectItem itemLabel="train" itemValue="train"></f:selectItem>
                            </h:selectOneMenu></td>
                    </tr>
                    <tr>
                        <td><b>Status</b></td>
                        <td><h:selectOneMenu value="#{listBean.pktour.available}" styleClass="styledselect_form_hungtl">
                                <f:selectItem itemLabel="active" itemValue="True"></f:selectItem>
                                <f:selectItem itemLabel="wait" itemValue="False"></f:selectItem>

                            </h:selectOneMenu></td>
                    </tr>

                    <tr>
                        <td><b>Description</b></td>
                        <td> <h:inputTextarea value="#{listBean.pktour.description}" id="txtdes" styleClass="form-textarea2"></h:inputTextarea></td>
                    </tr>
                    <tr>
                        <td><b>From Date</b></td>
                        <td> <p:calendar  value="#{listBean.pktour.fdate}" id="txtfdate"></p:calendar></td>
                    </tr>
                    <tr>
                        <td><b>To Date</b></td>
                        <td> <p:calendar  value="#{listBean.pktour.edate}" onblur="testDates(this.form);" id="txtedate" required="true"> </p:calendar></td>
                    </tr>

                    <tr>
                        <td><b>Image</b></td>
                        <td><p:fileUpload widgetVar="uploader2" fileUploadListener="#{uploadbean.fileUpload1}" id="UploadPath" auto="true" ></p:fileUpload></td>
                    </tr>
                    <tr>
                        <td><h:commandButton value="Create" action="#{listBean.updateTour}" styleClass="form-submit"></h:commandButton></td>

                    </tr>


                </tbody>
            </h:form>
        </table>
            </center>

        
        </ui:define>
    </ui:composition>

</html>


